<?php
/**
 * IQueryHandler interface to query handling
 * @package Core
 * @subpackage Database
 * @category Interface
 * @author kovacsricsi
 */

interface IQueryHandler
{
	/**
	 * Returns all row from database.
	 * @access public
	 * @static
	 * @param string $query
	 * @param array $prepare
	 * @return array
	 */
	public static function getAll($query = "", $prepare = null);

	/**
	 * Returns one row from database.
	 * @access public
	 * @static
	 * @param string $query
	 * @param array $prepare
	 * @return array
	 */
	public static function getOne($query = "", $prepare = null);

	/**
	 * Execute query.
	 * @access public
	 * @static
	 * @param string $query
	 * @param array $prepare
	 * @return void
	 */
	public static function execute($query = "", $prepare = null);

	/**
	 * Protect database from sqlinjection.
	 * @access public
	 * @static
	 * @param string $query
	 * @param array $prepare
	 * @return void
	 */
	public static function prepare(&$query, $prepare);
}
?>